FROM tt-acr-registry.cn-beijing.cr.aliyuncs.com/public/openjdk:17-alpine

ENV TZ=Asia/Shanghai
ENV JAVA_OPTS -Xms128M -Xmx512M -Djava.security.egd=file:/dev/./urandom -Dfile.encoding=UTF-8

#skywalking agent环境变量
#ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.99.25:11800" \
#    SW_AGENT_NAME="springboot-jk-demo"

# RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

VOLUME /opt/deploy/logs

ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar

ENTRYPOINT exec java ${JAVA_OPTS} -jar app.jar
